package com.api.core.domain.query;

import com.alibaba.fastjson2.JSONObject;
import com.api.common.utils.StringUtils;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

@Getter
@Setter
public class IpcTreeQuery {
    private String ipcCode;
    private JSONObject ipcNameLocales;
    private String type = "ipc";
    @JsonIgnore
    private String strIpcNameLocales;
//    private List<RobotTreeQuery> children;

    public void setStrIpcNameLocales(String strIpcNameLocales) {
        if(StringUtils.isNoneBlank(strIpcNameLocales)){
            this.ipcNameLocales = JSONObject.parseObject(strIpcNameLocales);
        }
        this.strIpcNameLocales = strIpcNameLocales;
    }
}